package com.shiwaixiangcun.monitor.repository;

import com.rabbit.spring.data.repository.GenericJpaRepository;
import com.shiwaixiangcun.monitor.domain.WarningContent;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by Administrator on 2017-11-24.
 */
public interface WarningContentRepository extends GenericJpaRepository<WarningContent, Long> {

    @Query("select w from WarningContent w where w.earlyWarning.id=:id")
    List<WarningContent> findByEarlyWarning(@Param("id") Long id);
}
